package picounit.java.type;

public class StackTrace {
    public StackTrace() {
        this.stackTrace = new Throwable().getStackTrace();
    }

    public Type callingType(int distanceToCaller) {
        return new Type(stackTrace[distanceToCaller].getClassName());
    }

    private final StackTraceElement[] stackTrace;
}
